<!--导航栏-->
<div class="row-fluid">
    <div class="navbar no-margin">
        <div class="navbar-inner">
            <ul class="breadcrumb">
                <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar"
                        rel='tooltip'>&nbsp;</a></i>
                <li>
                    <a href="#/smart">首页</a>
                </li>
                <li class="active">SmartDQ(研发中，敬请期待...)</li>
            </ul>
        </div>
    </div>
</div>
<style type="text/css">
    .autoHeight {
        height: calc(100vh - 85px);
    }
</style>

<div class="container-fluid">
    <div style="margin-left:10px;margin-right:10px;">
        <a href="https://docs.qq.com/sheet/DSGJxVWxTVHZQcVRa?tab=d7tq3w" style="float: right;padding-left:10px;" ><u>使用说明</u></a>
        <a href="#/smart/admin/smartdq_list" style="float: right; padding-left:10px;"><u>管理逻辑表</u></a>
    </div>
    <div class="row">
        <div style="width:28%; float: left; padding-left: 15pt;">
            <div>
                <input type='text' class="height: 30px;" ng-model="vm.p.search" id="search" style="width: 33rem; height: 27px;" />
                <button id="searchTable" type="button" class="btn-primary" ng-click="searchQuery()" style="height: 27px; width:80px;"> 搜索 </button>
            </div>
            <div id="tree" style="margin-top: 5px;"></div>
        </div>
        <div style="width:72%; float: right;">
            <div class="col-sm-12 col-md-12 main">
                <div>
                    <div>
                        逻辑表： {{vm.c.table}}
                    </div>
                    <div style="margin-top: 10px;">
                        时间范围： {{vm.c.dt}}
                    </div>
                    <div style="margin-top: 10px;">
                        <input type="radio" value="dim" ng-model="vm.c.selected" ng-checked="true"> 维度|
                        <label ng-repeat="it in vm.c.dims" style="margin-left: 10px;" ng-click="changeIt('dim',it)">{{it.text}}</label>
                    </div>
                    <div style="margin-top: 10px;">
                        <input type="radio" value="ind" ng-model="vm.c.selected"> 指标|
                        <label ng-repeat="it in vm.c.indexs" style="margin-left: 10px;" ng-click="changeIt('ind',it)">{{it.text}}</label>
                    </div>
                    <div style="margin-top: 10px;">
                        <input type="radio" value="filter" ng-model="vm.c.selected"> 过滤|
                        <label ng-repeat="it in vm.c.filters" style="margin-left: 10px;" ng-click="changeIt('filter',it)">{{it.text}}</label>
                    </div>
                    <div style="margin-top: 10px;">
                        <button class="btn-primary" style="height: 27px; width:80px;" ng-click="smartSql()" > 生成SQL </button>
                    </div>
                </div>
            </div>
            <div class="col-sm-12 col-md-12 main" style="margin-top: 20px;">
                <textarea ng-model="vm.c.sql" style="line-height: 1.3;width: 800px; height: 350px"></textarea>

                <div style="margin-top: 10px;">
                    <p>SQL调试、预览，请在星河中完成<a href="https://yunchuang.58corp.com/query" target="_blank">跳转星河</a></p>
                </div>
            </div>
        </div>
    </div>
</div>